<template>
	<view class="content">
		<u-navbar title=" " bg-color="rgba(0,0,0,0)" @leftClick="toUrl"></u-navbar>
		<image class="bg" mode="widthFix" src="/static/bg1.png"></image>
		<view class="footer">
			<view class="box">
				<view class="box__subtitle">装修不用东奔西跑</view>
				<view class="box__title">
					算算你家装修需要花多少钱
					<view class="bottom-bg"></view>
				</view>
				<view class="box__hoser flex">
					<view class="left"></view>
					<view class="">您选择的户型</view>
					<view class="right"></view>
				</view>
				<view class="box__black">
					<view class="flex">
						<text>户型</text>
						<text>{{n}}</text>
					</view>
					<view class="flex">
						<text>面积</text>
						<text>{{m2}}平方</text>
					</view>
					<!-- <view class="flex">
						<text>单价</text>
						<text>约{{p}}/m²</text>
					</view> -->
				</view>
				<view class="box__baojia">
					<view class="">计算报价约</view>
					<view class="">
						<u-count-to fontSize="86rpx" color="#FF6545" bold :startVal="50000"
							:endVal="money"></u-count-to>
						<text>元</text>
					</view>
				</view>
				<view class="box__btn">获取免费测量服务
					<button class="contact-btn" type="default" open-type="contact">获取免费测量服务</button>
				</view>
				<view class="box__tips">
					温馨提示：本报价包含：室内装修施工费,全屋定制家居。
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				money: 0,
				m2: 0,
				p: 0,
				n: ''
			}
		},
		onLoad(opt) {
			
			this.m2 = opt.m2 / 100
			this.p = opt.p
			this.n = opt.n
			this.money = parseInt(opt.m2 * opt.p / 100)
		},
		methods: {
			toUrl() {
				uni.redirectTo({
					url: '/pages/index/baojia'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100vh;
		overflow: hidden;
	}

	.bg {
		width: 750rpx;
		z-index: -1;
	}

	.flex {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.footer {
		background-color: #B3A284;
		height: 50vh;
		margin-top: -100rpx;
		padding-top: 90rpx;
		font-family: PingFang SC, PingFang SC;
		z-index: 2;

		.box {
			width: 570rpx;
			background-color: #FFF;
			padding: 40rpx 60rpx;
			margin: 0 auto;
			border-radius: 35rpx;
			margin-top: -230rpx;
			z-index: 2;
			position: relative;

			&__subtitle {
				font-weight: 400;
				font-size: 38rpx;
				color: #FF6545;
				text-align: center;
				font-style: normal;
				text-transform: none;
			}

			&__title {
				font-weight: 500;
				font-size: 48rpx;
				color: #000000;
				text-align: center;
				font-style: normal;
				text-transform: none;
				position: relative;
				margin-bottom: 30rpx;

				.bottom-bg {
					position: absolute;
					bottom: 4rpx;
					width: 100%;
					height: 16rpx;
					background: #FEFF04;
					border-radius: 0rpx 0rpx 0rpx 0rpx;
					opacity: 0.2;
				}
			}

			&__hoser {
				margin-bottom: 30rpx;

				.left {
					width: 134rpx;
					height: 0rpx;
					border: 2rpx solid;
					border-image: linear-gradient(90deg, rgba(51, 51, 51, 1), rgba(255, 255, 255, 1)) 2 2;
				}

				.right {
					width: 134rpx;
					height: 0rpx;
					border: 2rpx solid;
					border-image: linear-gradient(90deg, rgba(51, 51, 51, 1), rgba(255, 255, 255, 1)) 2 2;
				}
			}

			&__black {
				background: rgba(254, 255, 4, 0.2);
				padding: 20rpx;
				border-radius: 14rpx 14rpx 14rpx 14rpx;
				font-weight: 400;
				font-size: 32rpx;
				line-height: 60rpx;
				font-style: normal;
				text-transform: none;
				margin-bottom: 20rpx;
			}

			&__baojia {
				margin-bottom: 20rpx;

				view:first-child {
					font-weight: 400;
					font-size: 32rpx;
					color: #666666;
					line-height: 78rpx;
					text-align: center;
					font-style: normal;
					text-transform: none;
				}

				view:last-child {
					font-family: DIN Condensed, DIN Condensed;
					font-weight: bold;
					font-size: 86rpx;
					color: #FF6545;
					text-align: center;
					font-style: normal;
					text-transform: none;
					margin-top: -20rpx;

					text {
						font-weight: 400;
						font-size: 32rpx;
						color: #666666;
						font-style: normal;
						text-transform: none;
					}
				}
			}

			&__btn {
				background: linear-gradient(90deg, #1990FF 0%, #26ABFF 100%);
				border-radius: 10rpx 10rpx 10rpx 10rpx;
				height: 80rpx;
				font-size: 36rpx;
				color: #FFFFFF;
				text-align: center;
				font-style: normal;
				text-transform: none;
				line-height: 80rpx;
				margin-bottom: 40rpx;
				position: relative;
			}

			&__tips {
				font-weight: 400;
				font-size: 20rpx;
				color: #666666;
				font-style: normal;
				text-transform: none;
			}
		}
	}

	.contact-btn {
		position: absolute;
		top: 0;
		width: 100%;
		opacity: 0;
	}
</style>